package lianxi8;

import java.util.function.Consumer;

public class OnlineBankingLamdba {

	
	
	public static void main(String[] args) {
		new OnlineBankingLamdba().processCustomer(1337, (Customer c)-> System.out.println("Hello!") );
		
	}
	
	
	public void processCustomer(int id ,Consumer<Customer> makeCustomerHappy){
		Customer c =Database.getCustomerWithId(id);
		makeCustomerHappy.accept(c);
	}
	
	static private class Customer{}
	
	static private class Database{
		static Customer getCustomerWithId(int id ){
			return new Customer();
		}
	}
}
